package grape.workflow.rest.flowable.ext;


import grape.common.exception.runtime.RBaseException;
import org.flowable.idm.api.Group;
import org.flowable.idm.api.GroupQuery;
import org.flowable.idm.engine.IdmEngineConfiguration;
import org.flowable.idm.engine.impl.GroupQueryImpl;
import org.flowable.idm.engine.impl.persistence.entity.GroupEntity;
import org.flowable.idm.engine.impl.persistence.entity.GroupEntityManagerImpl;
import org.flowable.idm.engine.impl.persistence.entity.data.GroupDataManager;

import java.util.List;
import java.util.Map;

/**
 * Created by yw on 2017/2/4.
 */

public class CustomGroupEntityManager  extends GroupEntityManagerImpl {

    public CustomGroupEntityManager() {
        this(null, null);
    }
    public CustomGroupEntityManager(IdmEngineConfiguration idmEngineConfiguration, GroupDataManager groupDataManager) {
        super(idmEngineConfiguration, groupDataManager);
    }

    @Override
    public Group createNewGroup(String groupId) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");

    }

    @Override
    public GroupQuery createNewGroupQuery() {
        return new CustomGroupQueryImpl();
    }

    @Override
    public List<Group> findGroupByQueryCriteria(GroupQueryImpl query) {
        return null;
    }

    @Override
    public long findGroupCountByQueryCriteria(GroupQueryImpl query) {
        return 0;
    }

    @Override
    public List<Group> findGroupsByUser(String userId) {
        return null;
    }

    @Override
    public List<Group> findGroupsByNativeQuery(Map<String, Object> parameterMap) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public long findGroupCountByNativeQuery(Map<String, Object> parameterMap) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public boolean isNewGroup(Group group) {
        return false;
    }

    @Override
    public List<Group> findGroupsByPrivilegeId(String privilegeId) {
        return null;
    }

    @Override
    public GroupEntity create() {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public GroupEntity findById(String entityId) {
        return null;
    }

    @Override
    public void insert(GroupEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void insert(GroupEntity entity, boolean fireCreateEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public GroupEntity update(GroupEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public GroupEntity update(GroupEntity entity, boolean fireUpdateEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(String id) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(GroupEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(GroupEntity entity, boolean fireDeleteEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }
}
